
<script>
init({
  title: 'Multiple Sort',
  desc: 'Use Plugin: bootstrap-table-multiple-sort.',
  links: ['bootstrap-table.min.css'],
  scripts: [
    'bootstrap-table.min.js',
    'extensions/multiple-sort/bootstrap-table-multiple-sort.js'
  ]
})
</script>

<template>
  <table id="table">
    <thead>
      <tr>
        <th
          data-field="github.name"
          data-sortable="true"
        >
          Name
        </th>
        <th
          data-field="github.count.stargazers"
          data-sortable="true"
        >
          Stargazers
        </th>
        <th
          data-field="github.count.forks"
          data-sortable="true"
        >
          Forks
        </th>
        <th
          data-field="github.description"
          data-sortable="true"
        >
          Description
        </th>
      </tr>
    </thead>
  </table>
</template>

<script>
  function mounted () {
    $('#table').bootstrapTable({
      search: true,
      showColumns: true,
      showMultiSort: true,
      sortPriority: [
        {
          sortName: 'github.count.forks',
          sortOrder: 'desc'
        },
        {
          sortName: 'github.count.stargazers',
          sortOrder: 'desc'
        }
      ],
      url: 'json/data3.json'
    })
  }
</script>
